import { defineStore } from 'pinia'

let useDesignStore = defineStore('baseDesign', {
  state: () => ({
    layoutList: [],
    body: {},
  }),
  getters: {
    getLayoutList: (state) => state.layoutList,
    getBody: (state) => state.body,
  },
  actions: {
    setLayoutList(res) {
      this.layoutList = res
    },
    clearLayout() {
      this.layoutList = []
    },
    setBody(res) {
      this.body = res
    },
    clearBody() {
      this.body = {}
    },
  },
})
export default useDesignStore
